// Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
// Project developers.  See the top-level LICENSE file for dates and other
// details.  No copyright assignment is required to contribute to VisIt.

#ifndef POINTGLYPHATTRIBUTES_H
#define POINTGLYPHATTRIBUTES_H
#include <state_exports.h>
#include <GlyphTypes.h>
#include <string>
#include <AttributeSubject.h>


// ****************************************************************************
// Class: PointGlyphAttributes
//
// Purpose:
//    Attributes for point glyphs
//
// Notes:      Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation:   omitted
//
// Modifications:
//
// ****************************************************************************

class STATE_API PointGlyphAttributes : public AttributeSubject
{
public:
    // These constructors are for objects of this class
    PointGlyphAttributes();
    PointGlyphAttributes(const PointGlyphAttributes &obj);
protected:
    // These constructors are for objects derived from this class
    PointGlyphAttributes(private_tmfs_t tmfs);
    PointGlyphAttributes(const PointGlyphAttributes &obj, private_tmfs_t tmfs);
public:
    virtual ~PointGlyphAttributes();

    virtual PointGlyphAttributes& operator = (const PointGlyphAttributes &obj);
    virtual bool operator == (const PointGlyphAttributes &obj) const;
    virtual bool operator != (const PointGlyphAttributes &obj) const;
private:
    void Init();
    void Copy(const PointGlyphAttributes &obj);
public:

    virtual const std::string TypeName() const;
    virtual bool CopyAttributes(const AttributeGroup *);
    virtual AttributeSubject *CreateCompatible(const std::string &) const;
    virtual AttributeSubject *NewInstance(bool) const;

    // Property selection methods
    virtual void SelectAll();
    void SelectPointSizeVar();

    // Property setting methods
    void SetPointSize(double pointSize_);
    void SetPointType(GlyphType pointType_);
    void SetPointSizeVarEnabled(bool pointSizeVarEnabled_);
    void SetPointSizeVar(const std::string &pointSizeVar_);
    void SetPointSizePixels(int pointSizePixels_);

    // Property getting methods
    double            GetPointSize() const;
    GlyphType         GetPointType() const;
    bool              GetPointSizeVarEnabled() const;
    const std::string &GetPointSizeVar() const;
          std::string &GetPointSizeVar();
    int               GetPointSizePixels() const;

    // Persistence methods
    virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
    virtual void SetFromNode(DataNode *node);


    // Keyframing methods
    virtual std::string               GetFieldName(int index) const;
    virtual AttributeGroup::FieldType GetFieldType(int index) const;
    virtual std::string               GetFieldTypeName(int index) const;
    virtual bool                      FieldsEqual(int index, const AttributeGroup *rhs) const;

    // User-defined methods
    bool ChangesRequireRecalculation(const PointGlyphAttributes &) const;

    // IDs that can be used to identify fields in case statements
    enum {
        ID_pointSize = 0,
        ID_pointType,
        ID_pointSizeVarEnabled,
        ID_pointSizeVar,
        ID_pointSizePixels,
        ID__LAST
    };

private:
    double      pointSize;
    GlyphType   pointType;
    bool        pointSizeVarEnabled;
    std::string pointSizeVar;
    int         pointSizePixels;

    // Static class format string for type map.
    static const char *TypeMapFormatString;
    static const private_tmfs_t TmfsStruct;
};
#define POINTGLYPHATTRIBUTES_TMFS "dibsi"

#endif
